namespace Apps.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;

    [Table("PLAN_TEMPPURCHASE")]
    public partial class PLAN_TEMPPURCHASE
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public PLAN_TEMPPURCHASE()
        {
            PLAN_TEMPPURCHASEDETAIL = new HashSet<PLAN_TEMPPURCHASEDETAIL>();
        }

        [Key]
        [StringLength(40)]
        public string TEMPPURCHASE_ID { get; set; }

        [StringLength(40)]
        public string ODD_NUMBER { get; set; }

        public short? YEAR { get; set; }

        public byte? MONTH { get; set; }

        public decimal? PLANNED_PURCHASE { get; set; }

        public decimal? CURRENT_STOCK { get; set; }

        public decimal? ESTIMATE_COAL { get; set; }

        public int? TYPE { get; set; }

        [StringLength(200)]
        public string MARK { get; set; }

        [StringLength(40)]
        public string COMPILE_USER { get; set; }

        public DateTime? COMPILE_TIME { get; set; }

        [StringLength(40)]
        public string TEMPLATE_ID { get; set; }

        public int APPROVAL_STATUS { get; set; }

        public SysUser COMPILE_SYSUSER { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<PLAN_TEMPPURCHASEDETAIL> PLAN_TEMPPURCHASEDETAIL { get; set; }

        //public virtual WORKFLOW_TEMPLATE WORKFLOW_TEMPLATE { get; set; }
    }
}
